<?php
/**
  * Mar 14, 2008
  *
  * Coded by: Ropu
  *
  */
include('login.php');

if(isset($_GET['action'])) {
  try{
    $app = new App($_GET['app_id']);
    $h = $_SESSION['hacker'];
    switch($_GET['action']) {
      case 'add':
        $h->addFavoriteApp($app);
        break;
      case 'rem':
        $h->removeFavoriteApp($app);
        break;
      default;
				header('HTTP/1.0 400 Bad Request');
				die("Invalid Info... (Are you trying to hack??)");
    }
  } catch(Exception $e) {
		header('HTTP/1.0 400 Bad Request');
		die("Invalid Info... (Are you trying to hack??)");
  }
  die('ok');
}
header('HTTP/1.0 400 Bad Request');
die("Invalid Info... (Are you trying to hack??)");


